#ifndef HAL_SPI_H
#define HAL_SPI_H

typedef enum
{
    HAL_SPI_CHANNEL_1 = 0,
    HAL_SPI_CHANNEL_COUNT
}HalSPIChannel_t;

void HalSPIRegWrite(HalSPIChannel_t ch, unsigned char reg, unsigned char val);
unsigned char HalSPIRegRead(HalSPIChannel_t ch, unsigned char reg);
int HalSPIDataWrite(HalSPIChannel_t ch, unsigned char reg, unsigned char *data, unsigned char length);
void HalSPIDataRead(HalSPIChannel_t ch, unsigned char reg, unsigned char *rxbuff, unsigned char length);
void HalSPIInitialize(void);
#endif

